  // 高度场相关
  const terrainWidthExtents = 100;
  const terrainDepthExtents = 100;
  const terrainWidth = 128;
  const terrainDepth = 128;
  const terrainHalfWidth = terrainWidth / 2;
  const terrainHalfDepth = terrainDepth / 2;
  const terrainMaxHeight = 8;
  const terrainMinHeight = -2;
  const heightData = null;
  const ammoHeightData = null;

export default class  Montain extends THREE.Object3D{
    constructor(){
        super();
        init();
    }

    _gen_height(geometry){
        let vertices = geometry.attributes.position.array;
        let xe, ze;

        for (let i = 0; i < array.length; i++) {
            const element = array[i];
            
        }

        for (let i = 0; i < 4; i++) {
            xe = Math.random() * terrainWidthExtents;
            ze = Math.random() * terrainDepthExtents;
            // vertices[]
        }   
    }

    init(){
        var geometry = new THREE.PlaneBufferGeometry( 100, 100, terrainWidth - 1, terrainDepth - 1 );
        geometry.rotateX(-Math.PI / 2);
        
        this.add(geometry);
        this._gen_height()
    }
}